﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WorldSimulator
{
	/// <summary>
	/// Extensions for double
	/// </summary>
	public static class DoubleExtensions
    {
		/// <summary>
		/// Interprets the double as RAD and converts it to DEG
		/// </summary>
        public static double RadToDeg(this double Rad)
        {
            return 180 / System.Math.PI * Rad;
        }

		/// <summary>
		/// Interprets the double as DEF and converts it to RAD
		/// </summary>
        public static double DegToRad(this double Deg)
        {
            return Deg * System.Math.PI / 180;
        }
    }
}
